package cn.tedu.rms.orderDetail.controller;

import cn.tedu.rms.orderDetail.pojo.vo.OrderDetailVO;
import cn.tedu.rms.orderDetail.service.OrderDetailService;
import cn.tedu.rms.base.response.JsonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Slf4j
@RequestMapping("/v1/orderDetail")
public class OrderDetailControllrr {
    @Autowired
    private OrderDetailService reservationService;
    @GetMapping("/selectDish")
    public JsonResult selectOrderManagement(Long id){
        log.debug("查询订单详情信息,参数="+id);
        List<OrderDetailVO> list = reservationService.selectDish(id);
        log.debug("查询到的集合为"+list);
        return JsonResult.ok(list);
    }
}
